import About from '../pages/About'
const route = {
  path: '/about',
  component: About,
  beforeEnter: (to, from, next) => {
    next()
  },
  beforeRequest: {
    url: '/data/set?a=a',
    type: 'post',
    data: {b:2},
    response: function(err, data, next) {
      // next(new Error("接口请求失败"))
      next()
    }
  },
  afterRequest: {
    // errorBack: false,
    request: [
      {
        name: 'abc',
        url: '/data/set?a=a',
        type: 'post',
        must: true,
        response: function(err, data, next) {
          next()
        }
      },
      {
        name: 'abcc',
        url: '/data/set?a=ab',
        type: 'post',
        must: true,
        response: function(err, data, next) {
          next()
        }
      }
    ]
  }
}

export default route
